package tw.com.softleader.json.jackson.app;

import java.io.File;

import com.fasterxml.jackson.databind.ObjectMapper;

import tw.com.softleader.json.jackson.entity.Question08Entity;

public class Question08App {
	public static void main(String[] args) {
		
		// read file
		File q8File = new File("c:\\question08.json");
		
		Question08Entity q08Entity = new Question08Entity();
		try {
			// TODO 將 q08Entity 寫成 JSON 檔案, 我不想輸出 name 欄位, 請在 Question08Entity 增加 annotation

			ObjectMapper objectMapper = new ObjectMapper();
			
			objectMapper.writeValue(q8File, q08Entity);
			objectMapper.writeValue(System.out, q08Entity);
			
		} catch (Exception e) {
			e.printStackTrace();
		} 
		
		
		
	}
}
